Skip to content

Nightly: build when dev moved since the last nightly, not on a 24-hour window - #733

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/nightly-change-check
Nov 23, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
fix/nightly-change-check

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Problem

The nightly's check job builds only if dev has a commit from the last 24 hours. The cron says 06:00 UTC, but GitHub starts the run hours late: the last four scheduled runs started between 14:12 and 15:21 UTC. When a run starts later in the day than the run before, commits made in that gap fall outside both windows, and the nightly skips them until the next commit to dev.

Concrete case today (2026-11-23): the published nightly was built from 237e874. Since then dev has nine merges, including the 1.32.0 version bump, #714, #730 and #731. The newest is c546dfc at 15:29 UTC on 11-22. If today's run starts after 15:29 UTC, the check finds nothing in its window and skips.

Change

.github/workflows/nightly.yml, check job only. The job builds when dev's tip differs from the commit the nightly tag points at. The checkout already uses fetch-depth: 0, which also fetches tags. If the tag is missing, for example because a publish deleted the old release and then failed, the job builds. workflow_dispatch still always builds.

Side effect: if a nightly build fails, the next scheduled run tries again even if there are no new commits. Before this change it skipped once the commit was out of the 24-hour window.

Verification

I took the step's script out of the workflow file and ran it under bash -eo pipefail, the same shell Actions uses, against a throwaway repo:

Tag state Result
Tag behind HEAD has_changes=true
Tag at HEAD has_changes=false
No tag has_changes=true (the `

Takes effect

Scheduled runs use main's copy of the workflow, so this applies from the next dev to main merge. It doesn't change today's run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M98owbb9iKsAUWvSpjCFTz

…r window

The check job looked for dev commits in the last 24 hours. GitHub starts the
06:00 UTC cron hours late (14:12 to 15:21 UTC over the last four runs), so
when a run starts later in the day than the one before, commits made in that
gap fall outside both windows and the nightly skips them. Today that happens
if the run starts after 15:29 UTC: dev has nine merges since the published
nightly (237e874) but the newest is c546dfc at 15:29 UTC yesterday.

Compare dev's tip with the commit the nightly tag points at instead. A
missing tag (a publish that failed after deleting the old release) builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M98owbb9iKsAUWvSpjCFTz
@claude

claude Bot commented Nov 23, 2026

Copy link
Copy Markdown

Logic looks correct: the tag is created with --target $SHA of the built commit, fetch-depth: 0 fetches tags, and the || true keeps -e from ending the step when the tag is missing.

One nit: the header comment at .github/workflows/nightly.yml:7 still says check ... Skips the build when dev has no commit from the last 24 hours. That's now wrong. It should say the job skips when dev's tip equals the nightly tag's commit.

Also note the side effect you already called out: a persistently failing build will retry nightly with no new commits. That seems acceptable.

@claude

claude Bot commented Nov 23, 2026

Copy link
Copy Markdown

Looks good. The check script is correct under bash -eo pipefail: || true covers the missing-tag case, and ^{commit} handles an annotated tag. Publish tags the built SHA, so the comparison is against the right commit. I have two minor notes and neither blocks the merge.

  • The build job checks out ref: dev again instead of the SHA that check compared. If dev moves between the two jobs, the build uses the newer commit. The publish job tags the commit that was built, so the tag stays consistent. This was already the case before the PR.
  • As the PR description says, a failed build now retries every night while dev is unchanged. That seems acceptable.

@erikdarlingdata
erikdarlingdata merged commit 0f121b0 into dev Nov 23, 2026
3 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/nightly-change-check branch November 23, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant